package com.project.junM.controller;

import com.project.junM.entity.TMemberMedicalhistory;
import com.project.junM.service.MemberMedicalhistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

@RestController
@CrossOrigin
@RequestMapping("/memberMedicalhistory")
public class MemberMedicalhistoryController {

    @Autowired
    private MemberMedicalhistoryService memberMedicalhistoryService;

    @GetMapping("queryByMemberId")
    public TMemberMedicalhistory queryByMemberId(HttpSession session){
        return  memberMedicalhistoryService.selectByMemberId(session);
    }

}
